home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Servers.h
-
- Contains: Server Interfaces.
-
- Version: Technology: System 8
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- */
- #ifndef __SERVERS__
- #define __SERVERS__
-
- #ifndef __CODEFRAGMENTS__
- #include <CodeFragments.h>
- #endif
- #ifndef __KERNEL__
- #include <Kernel.h>
- #endif
- #ifndef __FILEMANAGERTYPES__
- #include <FileManagerTypes.h>
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=power
- /* the following contents can only be used by compilers that support PowerPC struct alignment */
-
- #if FOR_SYSTEM8_PREEMPTIVE
- typedef struct OpaqueServerID* ServerID;
-
- enum {
- kCreateServerResType = 'srvr',
- kCreateServerResID = 0
- };
-
- typedef OptionBits CreateServerOptions;
-
- enum {
- kServerReservesLowMem = (1L << 0), /* Cannot be enabled with kServerIsPrivileged*/
- kServerIsPrivileged = (1L << 1), /* Cannot be enabled with kServerReservesLowMem*/
- kCreateServerForLookup = (1L << 2),
- kCreateServerAtStartup = (1L << 3)
- };
-
- struct CreateServerDescriptor {
- CreateServerOptions createOptions;
- TaskName name;
- TaskOptions taskOptions;
- ByteCount stackSize;
- Str63 serverName;
- };
- typedef struct CreateServerDescriptor CreateServerDescriptor;
-
- typedef CreateServerDescriptor *CreateServerDescriptorPtr;
- typedef void (*ServerMainEntry)(ServerID server);
- extern OSStatus CreateServer(FSObjectRef fileRef_t, const KernelNotification *deathNotification_i, Duration timeout_i, Str63 serverName_o, ServerID *server_o, void **refcon_o);
-
- extern OSStatus CreateServerAsync(FSObjectRef fileRef_t, const KernelNotification *deathNotification_i, const KernelNotification *asyncNotification_i, Str63 serverName_o, ServerID *server_o, void **refcon_o);
-
- extern OSStatus RegisterServer(FSObjectRef fileRef_t, Str63 serverName_o);
-
- extern OSStatus DeregisterServer(ConstStr63Param serverName_t);
-
- extern OSStatus LookupServer(ConstStr63Param serverName_t, Duration timeout_i, ServerID *server_o, void **refcon_o);
-
- extern OSStatus LookupServerAsync(ConstStr63Param serverName_t, const KernelNotification *asyncNotification_i, ServerID *server_o, void **refcon_o);
-
- extern OSStatus ServerCreated(ServerID server_t, void *refcon_i);
-
- #endif
-
- #pragma options align=reset
- #endif /* PRAGMA_ALIGN_SUPPORTED */
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __SERVERS__ */
-
-